﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace Cloud.Core.Model
{
    /// <summary>
    /// 传感器表(Sensor)
    /// </summary>
    public class Sensor
    {
        /// <summary>
        /// 主键
        /// </summary>
        [Key]
        public string Id { get; set; }
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 额定载荷
        /// </summary>
        public int ratedLoad { get; set; }
        /// <summary>
        /// 灵敏度
        /// </summary>
        public string sensitivity { get; set; }

        /// <summary>
        /// 蠕变(30分钟)
        /// </summary>
        public string creep { get; set; }
        /// <summary>
        /// 零点平衡
        /// </summary>
        public string zeroPoint { get; set; }
        /// <summary>
        /// 输入抗阻
        /// </summary>
        public string inputImpedance { get; set; }
        /// <summary>
        /// 输出抗阻
        /// </summary>
        public string outputImpedance { get; set; }
        /// <summary>
        /// 工作温度范围
        /// </summary>
        public string workTemperature { get; set; }
        /// <summary>
        /// 安全过载
        /// </summary>
        public string safetyOverload { get; set; }
        /// <summary>
        /// 材质
        /// </summary>
        public string textureMaterial { get; set; }
        /// <summary>
        /// 材质
        /// </summary>
        public string outputSignal { get; set; }
        /// <summary>
        /// 是否推荐
        /// </summary>
        public int enabled { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        public string CreateUserId { get; set; }
        /// <summary>
        /// 修改人
        /// </summary>
        public string ModifyUserId { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateDate { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? ModifyDate { get; set; }

        public Sensor()
        {
            this.Id = Guid.NewGuid().ToString();
            this.CreateDate = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
            this.ModifyDate = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
        }
    }
}
